<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
   <style>
    header{
        width: 50%;
        height: 40px;
       
        margin: auto;
        position: relative;
    }
    .w{
        position: absolute;
        right:10px;
        top:1px;
    }
    .search input{
      
       width: 60%;
       
    }
   </style>
</head>
<body>
    <header>
        <div class="search">
            <input type="text" placeholder="搜索商品">
            <button>搜索</button>
        </div>
        <div class="w">
            <a href="">我的购物车</a>
        </div>
    </header>
   
    <script>
      
    </script>
</body>
</html>